package com.aier.user.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

import com.aier.common.common.Constant;

/**
 * 新鲜事实体
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "fresh", catalog = "abc")
public class Fresh implements java.io.Serializable {

    // 标志
    private Long fid;
    // 发布新鲜事的用户id
    private Long uid;
    // 新鲜事内容
    private String content;
    // 新鲜事的图片
    private String img;
    // 是否是原创 0原创1转发
    private Short type;
    // 原创新鲜事的id
    private Long relativeid;
    // 赞的次数
    private Long pcount;
    // 转发的次数
    private Long tcount;
    // 评论的次数
    private Long ccount;
    // 浏览的次数
    private Long bcount;
    // 发布时间
    private Timestamp cdate;
    // 发布时间的时间戳
    private Long stamp;
    // 可见度（0公开，1密友圈，2仅自己可见，3分组可见）
    private Short power;
    // 关注分组(0默认分组--特别关注；-1未分组）
    private Long fgid;
    
    // 昵称
    private String nickname;
    // 头像
    private String headimg;
    // 原创微博
    private Fresh fresh;
    
    // 登录用户是否赞过
    private Short pflag;
    // 登录用户是否收藏过
    private Short fflag;

    // Constructors

    /** default constructor */
    public Fresh() {
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "fid", unique = true, nullable = false)
    public Long getFid() {
        return this.fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }
    @Column(name = "uid", nullable = false, length = Constant.num_20)
    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }
    @Column(name = "type")
    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }
    @Column(name = "relativeid")
    public Long getRelativeid() {
        return relativeid;
    }

    public void setRelativeid(Long relativeid) {
        this.relativeid = relativeid;
    }
    @Column(name = "pcount")
    public Long getPcount() {
        return pcount;
    }

    public void setPcount(Long pcount) {
        this.pcount = pcount;
    }
    @Column(name = "tcount")
    public Long getTcount() {
        return tcount;
    }

    public void setTcount(Long tcount) {
        this.tcount = tcount;
    }
    @Column(name = "ccount")
    public Long getCcount() {
        return ccount;
    }

    public void setCcount(Long ccount) {
        this.ccount = ccount;
    }
    @Column(name = "bcount")
    public Long getBcount() {
        return bcount;
    }

    public void setBcount(Long bcount) {
        this.bcount = bcount;
    }
    @Column(name = "cdate")
    public Timestamp getCdate() {
        return cdate;
    }

    public void setCdate(Timestamp cdate) {
        this.cdate = cdate;
    }
    @Column(name = "power")
    public Short getPower() {
        return power;
    }

    public void setPower(Short power) {
        this.power = power;
    }
    @Column(name = "agid")
    public Long getFgid() {
        return fgid;
    }

    public void setFgid(Long fgid) {
        this.fgid = fgid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public Fresh getFresh() {
        return fresh;
    }

    public void setFresh(Fresh fresh) {
        this.fresh = fresh;
    }

    public Short getPflag() {
        return pflag;
    }

    public void setPflag(Short pflag) {
        this.pflag = pflag;
    }

    public Short getFflag() {
        return fflag;
    }

    public void setFflag(Short fflag) {
        this.fflag = fflag;
    }

    public Long getStamp() {
        return stamp;
    }

    public void setStamp(Long stamp) {
        this.stamp = stamp;
    }

}